var appMaster = {
	preLoader: function() {
		imageSources = []
		$('img').each(function() {
			var sources = $(this).attr('src');
			imageSources.push(sources);
		});
		if($(document).load()) {
			$('.pre-loader').fadeOut('slow');
		}
	},
	scrollMenu: function() {
		var num = 50; //number of pixels before modifying styles

		$(window).bind('scroll', function() {
			if($(window).scrollTop() > num) {
				$('nav').addClass('scrolled');

			} else {
				$('nav').removeClass('scrolled');
			}
		});
	},
	animateScript: function() {
		$('.scrollpoint.sp-effect1').waypoint(function() {
			$(this).toggleClass('active');
			$(this).toggleClass('animated fadeInLeft');
		}, {
			offset: '100%'
		});
		alert("test");
		$('.scrollpoint.sp-effect2').waypoint(function() {
			$(this).toggleClass('active');
			$(this).toggleClass('animated fadeInRight');
		}, {
			offset: '100%'
		});
		$('.scrollpoint.sp-effect3').waypoint(function() {
			$(this).toggleClass('active');
			$(this).toggleClass('animated fadeInDown');
		}, {
			offset: '100%'
		});
		$('.scrollpoint.sp-effect4').waypoint(function() {
			$(this).toggleClass('active');
			$(this).toggleClass('animated fadeIn');
		}, {
			offset: '100%'
		});
		$('.scrollpoint.sp-effect5').waypoint(function() {
			$(this).toggleClass('active');
			$(this).toggleClass('animated fadeInUp');
		}, {
			offset: '100%'
		});
	},
}

$(document).ready(function() {
	appMaster.scrollMenu();

	appMaster.animateScript();
})